1. Field of the Disclosure
This disclosure relates generally to computer systems; and more particularly, it is directed to simulating brushes for deposition of paint or ink onto a virtual canvas using computer systems, and performing imaging editing operations using a color space representation that includes a fill channel.
2. Description of the Related Art
Digital image editing is the process of creating and/or modifying digital images using a computer system. Using specialized software programs, users may manipulate and transform images in a variety of ways. These digital image editors may include programs of differing complexity, such as limited-purpose programs associated with acquisition devices (e.g., digital cameras and scanners with bundled or built-in programs for managing brightness and contrast); limited editors suitable for relatively simple operations such as rotating and cropping images; and professional-grade programs with large and complex feature sets.
Digital images may include raster graphics, vector graphics, or a combination thereof. Raster graphics data (also referred to herein as bitmaps) may be stored and manipulated as a grid of individual picture elements called pixels. A bitmap may be characterized by its width and height in pixels and also by the number of bits per pixel. Commonly, a color bitmap defined in the RGB (red, green blue) color space may comprise between one and eight bits per pixel for each of the red, green, and blue channels. An alpha channel may be used to store additional data such as per-pixel transparency (or opacity) values.
An operation often provided by a digital image editor is the use of a virtual “paintbrush” (also referred to herein as a “brush” or a “brush tool”) to modify a digital image by depositing virtual paint or virtual ink. Various prior approaches have attempted to model a real-world brush and its behavior in the context of such an operation. For example, a two-dimensional (2D) raster image may be created to represent the shape of the brush as it contacts the canvas, and the 2D image may be stamped repeatedly along the input path. In another approach, a vector representation of the brush tip has been used instead of a 2D raster image. In some systems, a brush tip is represented as a single triangle mesh.
Colors in the images in digital documents (and in image editing applications) are often represented in a color space such as RGB or CMYK. To these linear color channels, an alpha channel (A) is typically added to represent opacity. Previous work on pigment-based modeling of the effects of various editing operations on color was inspired by the Kubelka-Munk compositing equations. This previous work focused on physical modeling. In these approaches, an amount of pigment at each pixel (e.g., a density or concentration of one or more base pigments) is represented as part of the physics being simulated (e.g., in a fluid simulation), and complex rendering equations are used to determine the final color of each pixel. In these approaches, a pigment texture stores amounts of particular types of pigment, which are advected by respective fluid simulations. The final pigment amounts are turned into RGB values for rendering using the Kubelka-Munk compositing equations, which are fairly complicated and unintuitive.
Previous commercial digital painting applications do not address the issue of amounts of paint, and use standard RGBA compositing and mixing functions to determine the final color of each pixel following an image editing operation.